<?php 	$this->load->helper('date');
//Programer note:	ID attributes used for client-side operations. (ID follows modular '_camelCase' control naming convention).
//Name attribute is used for Posting/Data operations.	(Name follows field name from database convention) 
?>
<!DOCTYPE html>
<html>
	<head>
		<title><?php echo $title;?></title>
		<?php echo link_tag('css/ppharm_popup.css'.'?'.time());?> 
		<?php echo link_tag('css/custom-theme/jquery-ui-1.8.2.custom.css'.'?'.time());?>
		
		<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>  
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
		<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script>-->
		<script type="text/javascript" src="<?php echo base_url().('/js/jquery.min.js');?>"></script>
		<script type="text/javascript" src="<?php echo base_url().('/js/jquery-ui.min.js');?>"></script>
		<script type="text/javascript" src="<?php echo base_url().('/js/jquery.validate.min.js');?>"></script>
		<script type="text/javascript" src="<?php echo base_url().('/js/common_form_functions.js').'?'.time();//TODO:  Version this once complete. Must timestamp so it will always update from cache?>"></script>
		<script type="text/javascript">
			<?php //This function is called from the doc ready function in intervention_view.js'?> 
			function additional_javascript_doc_ready_functions()
			{
				<?php echo isset($additional_javascript_doc_ready_functions)? $additional_javascript_doc_ready_functions : '' ; ?>
			}
		
			<?php echo isset($additional_jquery_javascript) ? $additional_jquery_javascript : '' ?>
		
			function my_url()
			{
				return '<?php echo site_url(); //Needed to reference website from javascript?>';
			}
		</script>
	</head>
	<body>
	
		<div class = "ppg-logo">
			<image src="<?php echo base_url().'/images/comp_logo.jpg';?>"/>
		</div>
		<div class="facility-name">
			<span style="padding-right: 150px; font-family: Arial, 'Trebuchet MS', sans-serif; font-size: 22px;">
				<?php echo $heading;?>
			</span>
		</div>
		<div class = "clear-class"></div>

		<?php //echo validation_errors(); ?>
	
	<?php echo form_fieldset('','class = "small-popup-frameset"');?>
		<?php 
		$this->load->helper('form');
		echo form_open('drug/'.$save_type, array('id'=>'_drugForm'));
		?>
	
		<?php echo form_label('Item:', '_itemDesc');?>
		<input type="text" id = "_itemDesc" name="item_desc" value="<?php echo set_value('Item', $item_desc); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Generic:', '_genericDesc');?>
		<input type="text" id = "_genericDesc" name="generic_desc" value="<?php echo set_value('generic_desc', $generic_desc); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Size Code:', '_sizeCode');?>
		<input type="text" id = "_sizeCode" name="size_code" value="<?php echo set_value('size_code', $size_code); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Size Qty:', '_sizeQty');?>
		<input type="text" id = "_sizeQty" name="size_qty" value="<?php echo set_value('size_qty', $size_qty); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Strength Code:', '_strengthCode');?>
		<input type="text" id = "_strengthCode" name="strength_code" value="<?php echo set_value('strength_code', $strength_code); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Strength Qty:', '_strengthQty');?>
		<input type="text" id = "_strengthQty" name="strength_qty" value="<?php echo set_value('strength_qty', $strength_qty); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('NDFF AWP:', '_nddfAwp');?>
		<input type="text" id = "_ndffAwp" name="nddf_awp" value="<?php echo set_value('nddf_awp', $nddf_awp); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('NDDF NDC Number:', '_genericDesc');?>
		<input type="text" id = "_nddfNdcNumber" name="nddf_ndc_number" value="<?php echo set_value('nddf_ndc_number', $nddf_ndc_number); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('NDDF Package Size Qty:', '_nddfPackageSizeQty');?>
		<input type="text" id = "_nddfPackageSizeQty" name="nddf_package_size_qty" value="<?php echo set_value('nddf_package_size_qty', $nddf_package_size_qty); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Pack Size:', '_packSize');?>
		<input type="text" id = "_packSize" name="pack_size" value="<?php echo set_value('pack_size', $pack_size); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Wholesale Cost:', '_wholesaleCost');?>
		<input type="text" id = "_wholesaleCost" name="wholesale_cost" value="<?php echo set_value('wholesale_cost', $wholesale_cost); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Wholesale Each Cost:', '_wholesaleEachCost');?>
		<input type="text" id = "_wholesaleEachCost" name="wholesale_each_cost" value="<?php echo set_value('wholesale_each_cost', $wholesale_each_cost); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
		
		<?php echo form_label('Doses Per Day', '_dosesPerDay');?>
		<input type="text" id = "_dosesPerDay" name="doses_per_day" value="<?php echo set_value('doses_per_day', $doses_per_day); ?>" size="50" autocomplete="off" />
		<br class="clear" />
		<div class="horizontal-divider"></div>
					
		<?php echo form_hidden('drug_id', $drug_id);?>
		<?php echo form_hidden('uri',$this->uri->uri_string());?>
		 
	<?php	echo form_close(); ?>
	
	<?php echo form_fieldset_close(); ?>
	
	<div class="small-popup-button-class"> 
		<input name="save" id="_save" type="submit"	value="Ok"/>
		<button name="close" id="_close" />Close</button>
	</div>
	
	<div class = "clear-class"><?php //This class reuqired to get the footer to correctly appear in IE?></div>
	 
	<div class="footer"> 
		<?php echo form_label('Date added:', '_createdDate');?><input type="text" id="_createdDate" name = "created_date" readonly="readonly" tabindex="-1" value="<?php echo set_value('created_date', $created_date); ?>" size="50" autocomplete="off" />		
		<?php echo form_label('Last Modified:', '_modifiedDate');?><input type="text" id="_modifiedDate" name = "modified_date" readonly="readonly" tabindex="-1" value="<?php echo set_value('modified_date', $modified_date); ?>" size="50" autocomplete="off" />
	</div> 
 
	<input type="hidden" id="_createdDate" name = "created_date" readonly="readonly" tabindex="-1" value="<?php echo set_value('created_date', $created_date); ?>" size="50" autocomplete="off" />		
	<input type="hidden" id="_modifiedDate" name = "modified_date" readonly="readonly" tabindex="-1" value="<?php echo set_value('modified_date', $modified_date); ?>" size="50" autocomplete="off" />
		
	<?php //<p><br />Page rendered in {elapsed_time} seconds</p> ?>
	
	</body>
</html>